package main

import (
	"dc-go/boot"
	"dc-go/global"
)

func main() {
	global.DcViper = boot.Viper()
	global.DcLogger = boot.Zap()
	global.DcDb = boot.Postgres()
	// global.DcRedis = boot.Redis()
	if global.DcDb != nil {
		boot.Migrate(global.DcDb)
		db, _ := global.DcDb.DB()
		defer db.Close()
	} else {
		global.DcLogger.Info("There is no database defined")
	}
	boot.Boot()
}
